/**
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-01 21:14:38
 * Copyright (c) 2015- -版权所有
 */

package com.joysuch.wwyt.common.service;

import java.util.List;

import com.joysuch.wwyt.common.bean.CommonTypeDetailBean;
import com.joysuch.wwyt.common.bean.CommonTypeEditBean;
import com.joysuch.wwyt.common.bean.CommonTypeListBean;
import com.joysuch.wwyt.common.bean.CommonTypeListBean.SearchCommonType;
import com.joysuch.wwyt.common.entity.CommonType;
import com.joysuch.wwyt.common.enums.CommonTypes;
import com.joysuch.wwyt.core.bean.SimpleSelectListBean;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface CommonTypeService {

    public CommonType add(CommonTypeEditBean entity);

    void update(CommonTypeEditBean entity);

    Page<CommonTypeListBean> findByPage(Pageable page, SearchCommonType condition);

    void delete(Long id) throws BusinessRestrictionsException;

    CommonTypeDetailBean getById(Long id);

    CommonType findById(Long id);

    void updateTypeCount(CommonTypes type, Long typeId);

    public String getNameById(Long id);

    List<CommonType> getNameByIds(List<Long> ids);

    public List<SimpleSelectListBean> simpleList(CommonTypes ct);
}
